from Education.model.session import session


def personal_info_spider(user, name):
    url = "http://124.160.107.91:9090/xsgrxx.aspx"

    params = {
        'xh': user,
        'xm': name,
        'gnmkdm': 'N121801',
    }

    headers = {
        'Referer': "http://124.160.107.91:9090/xs_main.aspx?xh=" + user,
        'Content-Type': 'application/x-www-form-urlencoded',
    }

    response = session.get(url=url, headers=headers, params=params)
    html = response.text
    return html
